﻿using System.Net;
using System.Net.Sockets;

namespace Chess.Server
{
    public static class ConnectionManager
    {
        private static IPAddress ip = IPAddress.Parse("127.0.0.1");
        private static IPEndPoint endPoint = new IPEndPoint(ip, 1000);
        private static TcpListener listener = new TcpListener(endPoint);

        static ConnectionManager()
        {

        }

        public static void Start()
        {
            listener.Start();
            while (true)
            {
                TcpClient client = listener.AcceptTcpClient();
                SessionManager.Create(client);
            }
        }
    }
}
